<?php

// 应用程序路径
define('APP_PATH', DOCUMENT_PATH . '../Application/');
// 应用目录
define('APPS_DIR', 'Apps');

// 配置路径
define('CONFIG_PATH', DOCUMENT_PATH . '../Config/');

// 上传路径
define('UPLOADS_PATH', 'data/uploads/');

// $_SERVER['REQUEST_SCHEME'] . '://'
define('REQUEST_SCHEME', $_SERVER['REQUEST_SCHEME'] . '://');

// 主HOST
$host = $_SERVER['HTTP_HOST'];
$hosts = explode('.', $host);
if (count($hosts) > 2) {
	$hosts = array_reverse($hosts);
	$host = $hosts['1'] . '.' . $hosts['0'];
} else {
	$host = $host;
}
define('HOST', $host);

// 当前URL
define('CURRENT_URL', REQUEST_SCHEME . $_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI']);

// 缓存目录
define('CACHE_PATH', 'data/caches/');

// cookies前缀
define('COOKIES_PREFIX', 'I');